import keyword

# print(keyword.kwlist)
mokkaya_Data="hello,我是Mokkaya!"
demo_str=123456789
# print(demo_str[0:-1])
# print(demo_str[0])
# print(demo_str[2:5])
# print(mokkaya_Data + "6666")
#input("\n\n按下 enter 键后退出。")
class A:
    pass
class B(A):
    pass
print(isinstance(B(),A))
print(type(mokkaya_Data))
print(type(demo_str))
print(issubclass(bool,int))
print(0==False)
var1=5
var2=2
print(var1 % var2)
mokkaya_list=["mokkaya","admin","vendor","PC"]
baca_list=["Baca","admin","bacaPlus","baca_life"]
own_list=mokkaya_list+baca_list
print(own_list[0:-1])
print(own_list[1:6:2])
mokkaya_list.reverse()
a = [1, 2, 3, 4, 5, 6, 7, 'abc', 'def']
a.reverse()
print('列表反转结果：', a)

# def rewardlist(input):
#     inputlist=input.split(" ")
#     inputlist=inputlist[-1::-1]
#     output=" ".join(inputlist)
#     return output
#
# if __name__ == '__main__':
#     print(rewardlist("vv 了了捧 品牌 哦你哦你就 㕛 "))
demo_tuple=(1,2,3,5,6,8,7)

print(type(demo_tuple))
print(isinstance(demo_tuple,tuple))
print(demo_tuple[-1::-1])
#集合
data_set=set(); data_set2={"fdas","fdsfsa"}
sites = {'Google',"Google",'Taobao', 'Runoob', 'Facebook', 'Zhihu', 'Baidu'}
if "Googl" in sites:
    print("在集合中")
else:
    print("不在集合中")
print(sites)
print(data_set2)
set_a = set('123456')
set_b =set('7894561')
print(type(set_a))
print(set_a | set_b)
#字典
d_dict={}
d_dict["one"]="jianye"
d_dict["two"]="fangfang"
print(d_dict)
print(d_dict.keys())
print(d_dict.values())
print(d_dict.get("one"))
#数据类型转换
num_int = 123
num_str = "456"

print("Data type of num_int:",type(num_int))
print("Data type of num_str:",type(num_str))
#列表推导式
td_list=[i for  i in range(30) if i %3==0]
print(td_list)
a = []
for x in range(1,100,3):
  a.append([x,x+1,x+2])